package com.ruicar.afs.cloud.afscase.loanapprove.task.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruicar.afs.cloud.afscase.loanapprove.task.condition.LoanApproveTaskCondition;
import com.ruicar.afs.cloud.afscase.loanapprove.task.condition.LoanWaitSubmitTaskCondition;
import com.ruicar.afs.cloud.afscase.loanapprove.task.mapper.LoanWaitTaskPoolMapper;
import com.ruicar.afs.cloud.afscase.loanapprove.task.service.LoanWaitTaskService;
import com.ruicar.afs.cloud.afscase.loanapprove.task.vo.LoanWaitTaskSubmitVO;
import com.ruicar.afs.cloud.afscase.loanapprove.task.vo.LoanWaitTaskVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * <p>Description：放款待分配任务处理接口实现类</p>
 *
 * @author xueyu.ma
 * @Version 1.0
 * @CreateDate 2020-6-12
 */
@Service
@AllArgsConstructor
@Slf4j
public class LoanWaitTaskServiceImpl implements LoanWaitTaskService {

    private final LoanWaitTaskPoolMapper loanWaitTaskPoolMapper;

    @Override
    public IPage<LoanWaitTaskVO> getLoanWaitTaskVOList(Page page, LoanApproveTaskCondition loanApproveTaskCondition) {
        return this.loanWaitTaskPoolMapper.getLoanWaitTaskList(page, loanApproveTaskCondition);
    }

    /**
     * 获取放款待分配任务列表
     *
     * @param page      页码
     * @param condition 查询条件
     */
    @Override
    public IPage<LoanWaitTaskSubmitVO> getWaitSubmitTaskList(Page page, LoanWaitSubmitTaskCondition condition) {
        return this.loanWaitTaskPoolMapper.getWaitSubmitTaskList(page,condition);
    }
}
